package com.lej.home.view

import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.ViewGroup
import android.widget.HorizontalScrollView

/**
 *  author: cjq
 *  date  : 2022/6/16 0016
 *  desc  :
 */
@SuppressLint("ClickableViewAccessibility")
class MyHorizontalScrollview(context: Context, attributeSet: AttributeSet) : HorizontalScrollView(context,attributeSet){

    init {
        descendantFocusability = ViewGroup.FOCUS_BEFORE_DESCENDANTS
        isFocusable = true
        isFocusableInTouchMode = true
        setOnTouchListener { p0, _ ->
            p0?.requestFocusFromTouch()
            false
        }
    }
}